package com.zhuoya.healthcard.entity;

public final class FaceEnvironment
{
  public static final int AG_ID = 3;
  public static final String OS = "android";
  public static final String SDK_VERSION = "3.1.0.0";
  public static final String TAG = "Baidu-IDL-FaceSDK";
  public static long TIME_DETECT_MODULE = 0L;
  public static long TIME_DETECT_NO_FACE_CONTINUOUS = 0L;
  public static long TIME_LIVENESS_MODULE = 0L;
  public static long TIME_MODULE = 0L;
  public static long TIME_TIPS_REPEAT = 0L;
  public static final float VALUE_BLURNESS = 0.5f;
  public static final float VALUE_BRIGHTNESS = 40.0f;
  public static final int VALUE_CROP_FACE_SIZE = 400;
  public static final int VALUE_DECODE_THREAD_NUM = 2;
  public static final int VALUE_HEAD_PITCH = 10;
  public static final int VALUE_HEAD_ROLL = 10;
  public static final int VALUE_HEAD_YAW = 10;
  public static final boolean VALUE_IS_CHECK_QUALITY = true;
  public static final int VALUE_LIVENESS_DEFAULT_RANDOM_COUNT = 3;
  public static final int VALUE_MAX_CROP_IMAGE_NUM = 1;
  public static final int VALUE_MIN_FACE_SIZE = 200;
  public static final float VALUE_NOT_FACE_THRESHOLD = 0.6f;
  public static final float VALUE_OCCLUSION = 0.5f;
  private static boolean mIsDebug;
  private static int[] mSoundIds;
  private static int[] mTipsTextIds;

  static {
    FaceEnvironment.TIME_TIPS_REPEAT = 3000L;
    FaceEnvironment.TIME_MODULE = 0L;
    FaceEnvironment.TIME_DETECT_NO_FACE_CONTINUOUS = 1000L;
    FaceEnvironment.TIME_DETECT_MODULE = 15000L;
    FaceEnvironment.TIME_LIVENESS_MODULE = 15000L;
    FaceEnvironment.mIsDebug = false;
    FaceEnvironment.mSoundIds = new int[FaceStatusEnum.values().length];
    FaceEnvironment.mTipsTextIds = new int[FaceStatusEnum.values().length];
    int n = 0;
    while (true) {
      final int[] mSoundIds = FaceEnvironment.mSoundIds;
      if (n >= mSoundIds.length) {
        break;
      }
      mSoundIds[n] = 0;
      FaceEnvironment.mTipsTextIds[n] = 0;
      ++n;
    }
  }

  public static int getSoundId(final FaceStatusEnum faceStatusEnum) {
    return FaceEnvironment.mSoundIds[faceStatusEnum.ordinal()];
  }

  public static int getTipsId(final FaceStatusEnum faceStatusEnum) {
    return FaceEnvironment.mTipsTextIds[faceStatusEnum.ordinal()];
  }

  public static boolean isDebugable() {
    return FaceEnvironment.mIsDebug;
  }

  public static void setSoundId(final FaceStatusEnum faceStatusEnum, final int n) {
    final int[] mSoundIds = FaceEnvironment.mSoundIds;
    if (mSoundIds != null) {
      try {
        mSoundIds[faceStatusEnum.ordinal()] = n;
      }
      catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  }

  public static void setTipsId(final FaceStatusEnum faceStatusEnum, final int n) {
    final int[] mTipsTextIds = FaceEnvironment.mTipsTextIds;
    if (mTipsTextIds != null) {
      try {
        mTipsTextIds[faceStatusEnum.ordinal()] = n;
      }
      catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  }
}